package com.ruoyi.exa.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.exa.mapper.ExaBitchUserMapper;
import com.ruoyi.exa.domain.ExaBitchUser;
import com.ruoyi.exa.service.IExaBitchUserService;

/**
 * 批次员工Service业务层处理
 * 
 * @author linziheng
 * @date 2025-06-13
 */
@Service
public class ExaBitchUserServiceImpl implements IExaBitchUserService 
{
    @Autowired
    private ExaBitchUserMapper exaBitchUserMapper;

    /**
     * 查询批次员工
     * 
     * @param id 批次员工主键
     * @return 批次员工
     */
    @Override
    public ExaBitchUser selectExaBitchUserById(Long id)
    {
        return exaBitchUserMapper.selectExaBitchUserById(id);
    }


    /**
     * 根据批次，用户，试卷Id查询批次员工
     *
     * @param bitchId 批次Id
     * @param userId 用户Id
     * @param parperId 卷纸Id
     * @return
     */
    @Override
    public ExaBitchUser selectExaBitchUserByQuit(Long bitchId,Long userId,Long parperId){
        return exaBitchUserMapper.selectExaBitchUserByQuit(bitchId,userId,parperId);
    }

    /**
     * 查询批次员工列表
     * 
     * @param exaBitchUser 批次员工
     * @return 批次员工
     */
    @Override
    public List<ExaBitchUser> selectExaBitchUserList(ExaBitchUser exaBitchUser)
    {
        return exaBitchUserMapper.selectExaBitchUserList(exaBitchUser);
    }
    /**
     * 查询批次员工列表
     *
     * @param exaBitchUser 批次员工
     * @return 批次员工
     */
    @Override
    public List<ExaBitchUser> selectExaBitchUserAllList(ExaBitchUser exaBitchUser)
    {
        return exaBitchUserMapper.selectExaBitchUserAllList(exaBitchUser);
    }

    /**
     * 新增批次员工
     * 
     * @param exaBitchUser 批次员工
     * @return 结果
     */
    @Override
    public int insertExaBitchUser(ExaBitchUser exaBitchUser)
    {
        exaBitchUser.setCreateTime(DateUtils.getNowDate());
        return exaBitchUserMapper.insertExaBitchUser(exaBitchUser);
    }

    /**
     * 修改批次员工
     * 
     * @param exaBitchUser 批次员工
     * @return 结果
     */
    @Override
    public int updateExaBitchUser(ExaBitchUser exaBitchUser)
    {
        exaBitchUser.setUpdateTime(DateUtils.getNowDate());
        return exaBitchUserMapper.updateExaBitchUser(exaBitchUser);
    }

    /**
     * 批量删除批次员工
     * 
     * @param ids 需要删除的批次员工主键
     * @return 结果
     */
    @Override
    public int deleteExaBitchUserByIds(Long[] ids)
    {
        return exaBitchUserMapper.deleteExaBitchUserByIds(ids);
    }
    /**
     * 批量删除批次员工
     *
     * @param ids 需要删除的批次员工主键
     * @return 结果
     */
    @Override
    public int deleteExaBitchUserByBitchId(Long[] ids)
    {
        return exaBitchUserMapper.deleteExaBitchUserByBitchId(ids);
    }

    /**
     * 删除批次员工信息
     * 
     * @param id 批次员工主键
     * @return 结果
     */
    @Override
    public int deleteExaBitchUserById(Long id)
    {
        return exaBitchUserMapper.deleteExaBitchUserById(id);
    }
}
